# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Contributor: Michal Krenek (Mikos) <m.krenek@gmail.com>

pkgname=soapy_power
pkgver=1.6.1
pkgrel=11
pkgdesc="Obtain power spectrum from SoapySDR devices"
arch=('any')
url="https://github.com/xmikos/soapy_power"
license=('MIT')
depends=('python' 'python-numpy' 'python-simplesoapy' 'python-simplespectral')
makedepends=('python-setuptools')
optdepends=('soapyrtlsdr: Support for RTL-SDR dongles'
            'soapyairspy: Support for Airspy R2 and Airspy Mini'
            'soapyhackrf: Support for HackRF'
            'soapybladerf: Support for Nuand bladeRF'
            'soapyuhd: Support for Ettus USRP'
            'soapylms7: Support for LimeSDR and other LMS7002M based Myriad RF boards'
            'soapyosmo: Support for MiriSDR and RFSpace'
            'soapyremote: Use any SoapySDR device remotely over network'
            'python-scipy: Faster FFT calculations with scipy.fftpack library')
source=("$pkgname-$pkgver.tar.gz::https://github.com/xmikos/soapy_power/archive/v$pkgver.tar.gz")
sha256sums=('fcf80fb3eca178ff8ea2ce87bc5cc390fa2b17f8dc72fa9e1213ca4022f469e4')

build() {
  cd $pkgname-$pkgver

  python setup.py build
}

package() {
  cd $pkgname-$pkgver

  python setup.py install --root="$pkgdir" --optimize=1 --skip-build

  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
